package GamaCase;

public class Role {
    private String roleName;
    private int blood;

    //构造
    public Role() {
    }

    public Role(String roleName, int blood) {
        this.roleName = roleName;
        this.blood = blood;
    }

    //get和set
    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public int getBlood() {
        return blood;
    }

    public void setBlood(int blood) {
        this.blood = blood;
    }

    //攻击方法（方法的调用者攻击参数）
    public void attack(Role role){
        System.out.println(this.roleName+"攻击了"+role.roleName);
    }

}
